<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<html>
<head>
<title>
JSJaC Overview
</title>
<link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script>
function asd() {
	
		parent.document.title="JSJaCJSON.js Overview";
	
}
</script>
</head>
<body bgcolor="white" onload="asd();">

<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> 	<font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top">
<em>
<b>JSJaC</b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<center>
	
	   <h2>JSJaCJSON.js</h2>
	
</center>

	


<h4>Summary</h4>
<p>
	
		No overview generated for 'JSJaCJSON.js'<BR/><BR/>
	
</p>

<hr>


    <table border="1" cellpadding="3" cellspacing="0" width="100%">
    <tr bgcolor="#CCCCFF" class="TableHeadingColor">
    <td colspan=2><font size="+2">
    
        <b>Class Summary</b>
    
    </font></td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="JSJaCJSON.html">JSJaCJSON</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    </table>
    <hr/> 


<!-- ========== METHOD SUMMARY =========== -->

<!-- ========== END METHOD SUMMARY =========== -->


        <pre class="sourceview"><span class="comment">/* Copyright (c) 2005-2007 Sam Stephenson
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */</span>

<span class="comment">/*
  json.js
  taken from prototype.js, made static
*/</span>
<span class="reserved">function</span> JSJaCJSON() {}
JSJaCJSON.toString = <span class="reserved">function</span> (obj) {
  var m = {
    <span class="literal">'\b'</span>: <span class="literal">'\\b'</span>,
    <span class="literal">'\t'</span>: <span class="literal">'\\t'</span>,
    <span class="literal">'\n'</span>: <span class="literal">'\\n'</span>,
    <span class="literal">'\f'</span>: <span class="literal">'\\f'</span>,
    <span class="literal">'\r'</span>: <span class="literal">'\\r'</span>,
    <span class="literal">'"'</span> : <span class="literal">'\\"'</span>,
    <span class="literal">'\\'</span>: <span class="literal">'\\\\'</span>
  },
  s = {
    array: <span class="reserved">function</span> (x) {
      var a = [<span class="literal">'['</span>], b, f, i, l = x.length, v;
      <span class="reserved">for</span> (i = 0; i &lt; l; i += 1) {
        v = x[i];
        f = s[typeof v];
        <span class="reserved">if</span> (f) {
          v = f(v);
          <span class="reserved">if</span> (typeof v == <span class="literal">'string'</span>) {
            <span class="reserved">if</span> (b) {
              a[a.length] = <span class="literal">','</span>;
            }
            a[a.length] = v;
            b = true;
          }
        }
      }
      a[a.length] = <span class="literal">']'</span>;
      <span class="reserved">return</span> a.join(<span class="literal">''</span>);
    },
    <span class="literal">'boolean'</span>: <span class="reserved">function</span> (x) {
      <span class="reserved">return</span> String(x);
    },
    <span class="literal">'null'</span>: <span class="reserved">function</span> (x) {
      <span class="reserved">return</span> <span class="literal">"null"</span>;
    },
    number: <span class="reserved">function</span> (x) {
      <span class="reserved">return</span> isFinite(x) ? String(x) : <span class="literal">'null'</span>;
    },
    object: <span class="reserved">function</span> (x) {
      <span class="reserved">if</span> (x) {
        <span class="reserved">if</span> (x instanceof Array) {
          <span class="reserved">return</span> s.array(x);
        }
        var a = [<span class="literal">'{'</span>], b, f, i, v;
        <span class="reserved">for</span> (i in x) {
          <span class="reserved">if</span> (x.hasOwnProperty(i)) {
            v = x[i];
            f = s[typeof v];
            <span class="reserved">if</span> (f) {
              v = f(v);
              <span class="reserved">if</span> (typeof v == <span class="literal">'string'</span>) {
                <span class="reserved">if</span> (b) {
                  a[a.length] = <span class="literal">','</span>;
                }
                a.push(s.string(i), <span class="literal">':'</span>, v);
                b = true;
              }
            }
          }
        }
         
        a[a.length] = <span class="literal">'}'</span>;
        <span class="reserved">return</span> a.join(<span class="literal">''</span>);
      }
      <span class="reserved">return</span> <span class="literal">'null'</span>;
    },
    string: <span class="reserved">function</span> (x) {
      <span class="reserved">if</span> (/[<span class="literal">"\\\x00-\x1f]/.test(x)) {
                    x = x.replace(/([\x00-\x1f\\"</span>])/g, <span class="reserved">function</span>(a, b) {
          var c = m[b];
          <span class="reserved">if</span> (c) {
            <span class="reserved">return</span> c;
          }
          c = b.charCodeAt();
          <span class="reserved">return</span> <span class="literal">'\\u00'</span> +
          Math.floor(c / 16).toString(16) +
          (c % 16).toString(16);
        });
  }
  <span class="reserved">return</span> <span class="literal">'"'</span> + x + <span class="literal">'"'</span>;
}
  };

switch (typeof(obj)) {
 case <span class="literal">'object'</span>:
   <span class="reserved">return</span> s.object(obj);
 case <span class="literal">'array'</span>:
   <span class="reserved">return</span> s.array(obj);
   
 }
};

JSJaCJSON.parse = <span class="reserved">function</span> (str) {
  try {
    <span class="reserved">return</span> !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(
                                                       str.replace(/<span class="literal">"(\\.|[^"</span>\\])*"/g, <span class="literal">''</span>))) &amp;&amp;
            eval(<span class="literal">'('</span> + str + <span class="literal">')'</span>);
    } catch (e) {
        <span class="reserved">return</span> false;
    }
};
</pre>
	<hr>



<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top"><em>
<b>JSJaC</b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<font size="-1">

</font>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Feb 12 18:46:55 2008</div>
</body>
</html>
